# -*- coding: utf-8 -*-

#iibsoft - un software para el cálculo del índice de integridad biótica
#Copyright (C) 2007 Claudio A. Quezada R. <claudio.quezada.r@gmail.com>
#http://www.esteropuangue.cl/iibsoft - http://iibsoft.googlecode.com

#Este programa es Software Libre; usted puede redistribuirlo
#y/o modificarlo bajo los términos de la "GNU General Public
#License" como lo publica la "FSF Free Software Foundation",
#o (a su elección) de cualquier versión posterior.

#Este programa es distribuido con la esperanza de que le será
#útil, pero SIN NINGUNA GARANTIA; incluso sin la garantía
#implícita por el MERCADEO o EJERCICIO DE ALGÚN PROPÓSITO en
#particular. Vea la "GNU General Public License" para más
#detalles.

#Usted debe haber recibido una copia de la "GNU General Public
#License" junto con este programa, si no, escriba a la "FSF
#Free Software Foundation, Inc.", 59 Temple Place - Suite 330,
#Boston, MA  02111-1307, USA, 
#o visite el sitio de iibsoft: http://iibsoft.googlecode.com

from PyQt4 import QtCore, QtGui

class Ui_Balanza(object):
    def setupUi(self, Balanza):
        Balanza.setObjectName("Balanza")
        Balanza.resize(QtCore.QSize(QtCore.QRect(0,0,372,352).size()).expandedTo(Balanza.minimumSizeHint()))
        Balanza.setMouseTracking(False)

        self.gridlayout = QtGui.QGridLayout(Balanza)
        self.gridlayout.setMargin(4)
        self.gridlayout.setHorizontalSpacing(2)
        self.gridlayout.setVerticalSpacing(1)
        self.gridlayout.setObjectName("gridlayout")

        self.groupBox_3 = QtGui.QGroupBox(Balanza)
        self.groupBox_3.setObjectName("groupBox_3")

        self.gridlayout1 = QtGui.QGridLayout(self.groupBox_3)
        self.gridlayout1.setMargin(2)
        self.gridlayout1.setSpacing(4)
        self.gridlayout1.setObjectName("gridlayout1")

        self.vboxlayout = QtGui.QVBoxLayout()
        self.vboxlayout.setObjectName("vboxlayout")

        self.lcdBalanza = QtGui.QLCDNumber(self.groupBox_3)

        font = QtGui.QFont()
        font.setPointSize(10)
        self.lcdBalanza.setFont(font)
        self.lcdBalanza.setFrameShape(QtGui.QFrame.Panel)
        self.lcdBalanza.setFrameShadow(QtGui.QFrame.Sunken)
        self.lcdBalanza.setLineWidth(1)
        self.lcdBalanza.setMidLineWidth(0)
        self.lcdBalanza.setSmallDecimalPoint(False)
        self.lcdBalanza.setNumDigits(7)
        self.lcdBalanza.setMode(QtGui.QLCDNumber.Dec)
        self.lcdBalanza.setSegmentStyle(QtGui.QLCDNumber.Filled)
        self.lcdBalanza.setProperty("intValue",QtCore.QVariant(0))
        self.lcdBalanza.setObjectName("lcdBalanza")
        self.vboxlayout.addWidget(self.lcdBalanza)

        self.hboxlayout = QtGui.QHBoxLayout()
        self.hboxlayout.setObjectName("hboxlayout")

        self.btnLeer = QtGui.QPushButton(self.groupBox_3)
        self.btnLeer.setObjectName("btnLeer")
        self.hboxlayout.addWidget(self.btnLeer)
        self.vboxlayout.addLayout(self.hboxlayout)
        self.gridlayout1.addLayout(self.vboxlayout,0,0,1,1)

        self.vboxlayout1 = QtGui.QVBoxLayout()
        self.vboxlayout1.setObjectName("vboxlayout1")

        self.btnConectar = QtGui.QPushButton(self.groupBox_3)
        self.btnConectar.setCheckable(True)
        self.btnConectar.setObjectName("btnConectar")
        self.vboxlayout1.addWidget(self.btnConectar)

        self.groupBox_2 = QtGui.QGroupBox(self.groupBox_3)
        self.groupBox_2.setObjectName("groupBox_2")

        self.gridlayout2 = QtGui.QGridLayout(self.groupBox_2)
        self.gridlayout2.setObjectName("gridlayout2")

        self.COM1 = QtGui.QRadioButton(self.groupBox_2)
        self.COM1.setObjectName("COM1")
        self.gridlayout2.addWidget(self.COM1,0,0,1,1)

        self.COM2 = QtGui.QRadioButton(self.groupBox_2)
        self.COM2.setObjectName("COM2")
        self.gridlayout2.addWidget(self.COM2,0,1,1,1)

        self.COM3 = QtGui.QRadioButton(self.groupBox_2)
        self.COM3.setObjectName("COM3")
        self.gridlayout2.addWidget(self.COM3,1,0,1,1)

        self.COM4 = QtGui.QRadioButton(self.groupBox_2)
        self.COM4.setObjectName("COM4")
        self.gridlayout2.addWidget(self.COM4,1,1,1,1)
        self.vboxlayout1.addWidget(self.groupBox_2)

        self.groupBox = QtGui.QGroupBox(self.groupBox_3)
        self.groupBox.setObjectName("groupBox")

        self.gridlayout3 = QtGui.QGridLayout(self.groupBox)
        self.gridlayout3.setObjectName("gridlayout3")

        self.gridlayout4 = QtGui.QGridLayout()
        self.gridlayout4.setObjectName("gridlayout4")

        self.hboxlayout1 = QtGui.QHBoxLayout()
        self.hboxlayout1.setObjectName("hboxlayout1")

        self.label_3 = QtGui.QLabel(self.groupBox)
        self.label_3.setObjectName("label_3")
        self.hboxlayout1.addWidget(self.label_3)

        self.comboBaudRate = QtGui.QComboBox(self.groupBox)
        self.comboBaudRate.setObjectName("comboBaudRate")
        self.hboxlayout1.addWidget(self.comboBaudRate)
        self.gridlayout4.addLayout(self.hboxlayout1,0,0,1,1)

        self.hboxlayout2 = QtGui.QHBoxLayout()
        self.hboxlayout2.setObjectName("hboxlayout2")

        self.label_4 = QtGui.QLabel(self.groupBox)
        self.label_4.setObjectName("label_4")
        self.hboxlayout2.addWidget(self.label_4)

        self.spinTimeout = QtGui.QSpinBox(self.groupBox)
        self.spinTimeout.setMaximum(10000)
        self.spinTimeout.setProperty("value",QtCore.QVariant(1000))
        self.spinTimeout.setObjectName("spinTimeout")
        self.hboxlayout2.addWidget(self.spinTimeout)
        self.gridlayout4.addLayout(self.hboxlayout2,1,0,1,1)
        self.gridlayout3.addLayout(self.gridlayout4,0,0,1,1)
        self.vboxlayout1.addWidget(self.groupBox)
        self.gridlayout1.addLayout(self.vboxlayout1,0,1,1,1)
        self.gridlayout.addWidget(self.groupBox_3,0,0,1,1)

        self.groupBox_4 = QtGui.QGroupBox(Balanza)
        self.groupBox_4.setObjectName("groupBox_4")

        self.gridlayout5 = QtGui.QGridLayout(self.groupBox_4)
        self.gridlayout5.setMargin(3)
        self.gridlayout5.setSpacing(4)
        self.gridlayout5.setObjectName("gridlayout5")

        self.lcdConteo = QtGui.QLCDNumber(self.groupBox_4)
        self.lcdConteo.setFrameShape(QtGui.QFrame.Panel)
        self.lcdConteo.setFrameShadow(QtGui.QFrame.Sunken)
        self.lcdConteo.setLineWidth(1)
        self.lcdConteo.setMidLineWidth(0)
        self.lcdConteo.setSmallDecimalPoint(False)
        self.lcdConteo.setMode(QtGui.QLCDNumber.Dec)
        self.lcdConteo.setSegmentStyle(QtGui.QLCDNumber.Filled)
        self.lcdConteo.setProperty("intValue",QtCore.QVariant(0))
        self.lcdConteo.setObjectName("lcdConteo")
        self.gridlayout5.addWidget(self.lcdConteo,0,0,1,1)

        self.vboxlayout2 = QtGui.QVBoxLayout()
        self.vboxlayout2.setObjectName("vboxlayout2")

        self.hboxlayout3 = QtGui.QHBoxLayout()
        self.hboxlayout3.setObjectName("hboxlayout3")

        self.label = QtGui.QLabel(self.groupBox_4)
        self.label.setObjectName("label")
        self.hboxlayout3.addWidget(self.label)

        self.comboEstacion = QtGui.QComboBox(self.groupBox_4)
        self.comboEstacion.setObjectName("comboEstacion")
        self.hboxlayout3.addWidget(self.comboEstacion)
        self.vboxlayout2.addLayout(self.hboxlayout3)

        self.hboxlayout4 = QtGui.QHBoxLayout()
        self.hboxlayout4.setObjectName("hboxlayout4")

        self.label_2 = QtGui.QLabel(self.groupBox_4)
        self.label_2.setObjectName("label_2")
        self.hboxlayout4.addWidget(self.label_2)

        self.comboEspecie = QtGui.QComboBox(self.groupBox_4)
        self.comboEspecie.setObjectName("comboEspecie")
        self.hboxlayout4.addWidget(self.comboEspecie)
        self.vboxlayout2.addLayout(self.hboxlayout4)
        self.gridlayout5.addLayout(self.vboxlayout2,0,1,1,1)
        self.gridlayout.addWidget(self.groupBox_4,2,0,1,1)

        self.hboxlayout5 = QtGui.QHBoxLayout()
        self.hboxlayout5.setContentsMargins(3,5,3,3)
        self.hboxlayout5.setObjectName("hboxlayout5")

        spacerItem = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
        self.hboxlayout5.addItem(spacerItem)

        self.btnAceptar = QtGui.QPushButton(Balanza)
        self.btnAceptar.setObjectName("btnAceptar")
        self.hboxlayout5.addWidget(self.btnAceptar)

        self.btnCancelar = QtGui.QPushButton(Balanza)
        self.btnCancelar.setObjectName("btnCancelar")
        self.hboxlayout5.addWidget(self.btnCancelar)

        self.btnAyuda = QtGui.QPushButton(Balanza)
        self.btnAyuda.setObjectName("btnAyuda")
        self.hboxlayout5.addWidget(self.btnAyuda)

        spacerItem1 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
        self.hboxlayout5.addItem(spacerItem1)
        self.gridlayout.addLayout(self.hboxlayout5,4,0,1,1)

        spacerItem2 = QtGui.QSpacerItem(20,40,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Expanding)
        self.gridlayout.addItem(spacerItem2,3,0,1,1)

        spacerItem3 = QtGui.QSpacerItem(20,40,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Expanding)
        self.gridlayout.addItem(spacerItem3,1,0,1,1)

        self.retranslateUi(Balanza)
        self.comboBaudRate.setCurrentIndex(1)
        QtCore.QObject.connect(self.btnAceptar,QtCore.SIGNAL("clicked()"),Balanza.close)
        QtCore.QObject.connect(self.btnCancelar,QtCore.SIGNAL("clicked()"),Balanza.reject)
        QtCore.QMetaObject.connectSlotsByName(Balanza)

    def retranslateUi(self, Balanza):
        Balanza.setWindowTitle(QtGui.QApplication.translate("Balanza", "Capturar datos desde Balanza", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox_3.setTitle(QtGui.QApplication.translate("Balanza", "Balanza", None, QtGui.QApplication.UnicodeUTF8))
        self.btnLeer.setText(QtGui.QApplication.translate("Balanza", "Lectura", None, QtGui.QApplication.UnicodeUTF8))
        self.btnConectar.setText(QtGui.QApplication.translate("Balanza", "Conectar", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox_2.setTitle(QtGui.QApplication.translate("Balanza", "Puerto serie", None, QtGui.QApplication.UnicodeUTF8))
        self.COM1.setText(QtGui.QApplication.translate("Balanza", "COM1", None, QtGui.QApplication.UnicodeUTF8))
        self.COM2.setText(QtGui.QApplication.translate("Balanza", "COM2", None, QtGui.QApplication.UnicodeUTF8))
        self.COM3.setText(QtGui.QApplication.translate("Balanza", "COM3", None, QtGui.QApplication.UnicodeUTF8))
        self.COM4.setText(QtGui.QApplication.translate("Balanza", "COM4", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox.setTitle(QtGui.QApplication.translate("Balanza", "Conexión", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setText(QtGui.QApplication.translate("Balanza", "Baudios", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBaudRate.addItem(QtGui.QApplication.translate("Balanza", "1200", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBaudRate.addItem(QtGui.QApplication.translate("Balanza", "2400", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBaudRate.addItem(QtGui.QApplication.translate("Balanza", "4800", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBaudRate.addItem(QtGui.QApplication.translate("Balanza", "9600", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("Balanza", "Tiempo de espera (ms)", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox_4.setTitle(QtGui.QApplication.translate("Balanza", "Conteo de items", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("Balanza", "Estación :", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("Balanza", "Especie :", None, QtGui.QApplication.UnicodeUTF8))
        self.btnAceptar.setText(QtGui.QApplication.translate("Balanza", "Aceptar", None, QtGui.QApplication.UnicodeUTF8))
        self.btnCancelar.setText(QtGui.QApplication.translate("Balanza", "Cancelar", None, QtGui.QApplication.UnicodeUTF8))
        self.btnAyuda.setText(QtGui.QApplication.translate("Balanza", "Ayuda", None, QtGui.QApplication.UnicodeUTF8))



if __name__ == "__main__":
    import sys
    app = QtGui.QApplication(sys.argv)
    Balanza = QtGui.QDialog()
    ui = Ui_Balanza()
    ui.setupUi(Balanza)
    Balanza.show()
    sys.exit(app.exec_())
